a09d68575699f9e7dabb49426e120c25a22b4ae0,openapi/src/com/intellij/util/ui/tree/TreeUtil.java,TreeUtil,showAndSelect,#JTree#number#number#number#boolean#,405

Before Change


      tree.setSelectionRow(row);
    }

    if (bounds != null) {
      tree.scrollRectToVisible(bounds);
    }
  }

After Change


      tree.setSelectionRow(row);
    }

    if (bounds != null) {
      final Range<Integer> range = getExpandControlRange(tree, path);
      if (range != null) {
        int delta = bounds.x - range.getFrom().intValue();
        bounds.x -= delta;
        bounds.width -= delta;
      }

      if (visible.width < bounds.width) {
        bounds.width = visible.width;
      }

      final boolean siblings = areSiblings(path, tree.getPathForRow(previous));
      boolean totallyInvisible = !visible.contains(bounds) && !visible.intersects(bounds);

      if (siblings && !totallyInvisible) {
        bounds.x = visible.x;
        bounds.width = visible.width;
      }

      tree.scrollRectToVisible(bounds);
    }
  }